<?php

/*
  | --------------------------------------------------------------------------------------------------
  | <novo_profissional_view>
  |
  | Desenvolvedor:	Eduardo Sirangelo
  | E-mail:		sirangelos@ibest.com.br
  | Descrição:
  |	-
  | Quality is Everyting
  | --------------------------------------------------------------------------------------------------
 */
?>
<script src="<?=base_url()?>public/js/cadastros/novo_profissional.js"></script>

<section class="grid_8">
    
    <div class="block-border">
        
        <?
        $attributes = array('class' => 'block-content form', 'id' => 'formProfissionais');
        echo form_open('/cadastros/insert_profissional/',$attributes);

        ?>
            
            <h1>Cadastro de Novo Profissional</h1>

            <div class="columns">
                    
                    <div>

                            <div id="tab-global" class="tabs-content">

                                <div class="tabs-content">

                                        <div id="tab-locales">

                                                <div class="margin-bottom_10">
                                                    
                                                    <fieldset class="grey-bg">

                                                        <legend>Dados principais</legend>

                                                        <div class="required margin-bottom_10">
                                                                <label for="complex-title">Nome</label>
                                                                <span class="relative">
                                                                        <input type="text" name="nome_profissional" id="nome_profissional" value="" class="full-width"/>
                                                                        <span class="check-ok"></span>
                                                                </span>
                                                        </div>
                                                        
                                                        <div class="colx2-left margin-bottom_10 required">
                                                                <span class="label">Fone Celular</span>
                                                                <span class="relative">
                                                                        <input type="text" name="fone_cel" id="fone_cel" value="" class="full-width" setFone="true"/>
                                                                        <span class="check-ok"></span>
                                                                </span>
                                                        </div>
                                                        <div class="colx2-right">
                                                                <span class="label">Fone Residencial</span>
                                                                <span class="relative">
                                                                        <input type="text" name="fone_res" id="fone_res" value="" class="full-width" setFone="true"/>
                                                                        <span class="check-ok"></span>
                                                                </span>
                                                        </div>

                                                    </fieldset>
                                                    
                                                </div>

                                                <ul class="mini-tabs no-margin js-tabs same-height">
                                                        <li class="current"><a href="#tab-en">Endereço</a></li>
                                                        <li><a href="#tab-es">Especialidades</a></li>
                                                        <li><a href="#tab-oi">Outras informações</a></li>
                                                </ul>

                                                <div id="tab-en">

                                                    <div class="columns">
                                                        <p class="colx3-left">
                                                            <label for="">CEP</label>
                                                            <input type="text" name="cep" id="cep" value="" class="full-width" setCep="true"/>
                                                        </p>
                                                    </div>
                                                    
                                                    <div class="columns">
                                                        <p class="colx3-left-double">
                                                            <label for="">Logradouro</label>
                                                            <input type="text" name="endereco" id="endereco" value="" class="full-width"/>
                                                        </p>
                                                        <p class="colx3-right">
                                                            <label for="">Número</label>
                                                            <input type="text" name="numero" id="numero" value="" class="full-width"/>
                                                        </p>
                                                    </div>
                                                    
                                                    <div class="columns">
                                                        <p class="colx3-left">
                                                            <label for="">Complemento</label>
                                                            <input type="text" name="complemento" id="complemento" value="" class="full-width"/>
                                                        </p>
                                                        <p class="colx3-center">
                                                            <label for="">Bairro</label>
                                                            <input type="text" name="bairro" id="bairro" value="" class="full-width"/>
                                                        </p>
                                                        <p class="colx3-right">
                                                            <label for="">Cidade / UF</label>
                                                            <input type="text" name="municipio" id="municipio" value="" class="size-75"/>
                                                            <input type="text" name="uf" id="uf" value="" class="size-25 upper" setUf="true"/>
                                                        </p>
                                                    </div>
                                                    
                                                </div>
                                                
                                                <div id="tab-es">
                                                    
                                                    <fieldset>
                                                        <legend>Selecione a(s) especialidade(s) do profissional</legend>
                                                        <?
                                                        foreach($query->result() as $row) {
                                                            ?>
                                                            <div class="columns">
                                                                <div class="colx2-left">
                                                                    <label for="especialidade_<?=$row->id_especialidade?>"><?=$row->especialidade?></label>
                                                                </div>
                                                                <div class="colx2-right">
                                                                    <input type="checkbox" name="especialidade_<?=$row->id_especialidade?>" id="especialidade_<?=$row->id_especialidade?>" value="<?=$row->id_especialidade?>" title="Habilite/desabilite especialidade" class="mini-switch with-tip"/>
                                                                </div>
                                                            </div>

                                                            <?
                                                        }
                                                        ?>
                                                    </fieldset>
                                                    
                                                </div>
                                                    
                                                <div id="tab-oi">    
                                                    
                                                    <fieldset>
                                                        
                                                        <legend>Gerais</legend>
                                                        
                                                            <div class="columns">
                                                                <p class="colx2-left">
                                                                    <label for="">Apelido</label>
                                                                    <input type="text" name="apelido" id="apelido" value="" class="full-width"/>
                                                                </p>
                                                                <p class="colx2-right">
                                                                    <label for="">Data de nascimento</label>
                                                                    <input type="text" name="dt_nascimento" id="dt_nascimento" value="" class="full-width" setDate="true"/>
                                                                </p>
                                                            </div>
                                                        
                                                            <div class="columns">
                                                                <label for="">E-mail</label>
                                                                <input type="text" name="email" id="email" value="" class="full-width"/>
                                                            </div>
                                                        
                                                    </fieldset>
                                                    
                                                    <fieldset>
                                                        
                                                        <legend>Documentação</legend>
                                                        
                                                            <div class="columns">
                                                                <p class="colx2-left">
                                                                    <label for="">RG</label>
                                                                    <input type="text" name="rg" id="rg" value="" class="full-width"/>
                                                                </p>
                                                                <p class="colx2-right">
                                                                    <label for="">CPF</label>
                                                                    <input type="text" name="cpf" id="cpf" value="" class="full-width" setCpf="true"/>
                                                                </p>
                                                            </div>
                                                        
                                                    </fieldset>
                                                    
                                                    <fieldset>
                                                        
                                                        <legend>Redes Sociais</legend>
                                                        
                                                            <div class="columns">
                                                                
                                                                <p class="colx3-left">
                                                                    <label for="">Facebook</label>
                                                                    <input type="text" name="facebook" id="facebook" value="" class="full-width"/>
                                                                </p>
                                                                <p class="colx3-center">
                                                                    <label for="">Twitter</label>
                                                                    <input type="text" name="twitter" id="twitter" value="" class="full-width"/>
                                                                </p>
                                                                <p class="colx3-right">
                                                                    <label for="">Orkut</label>
                                                                    <input type="text" name="orkut" id="orkut" value="" class="full-width"/>
                                                                </p>
                                                                
                                                            </div>
                                                        
                                                    </fieldset>
                                                
                                                </div>
                                        </div>
                                </div>
                                
                            </div>

                    </div>

            </div>
            
            <fieldset class="grey-bg no-margin">
                    <legend>Salve seu trabalho</legend>
                    <p class="input-with-button">
                            <label for="simple-action">Ações na criação do profissional</label>
                            <select name="ativo" id="ativo">
                                    <option value="1">Salvar e ativar</option>
                                    <option value="0">Salvar apenas</option>
                            </select>
                            <button type="submit">Salvar</button>
                            <img src="<?=base_url()?>public/images/ajax-loading.gif" alt="" class="ajax-loading-new" id="ajax-loading"/>
                    </p>
            </fieldset>

        </form>
    
    </div>
    
    <div id="content_loading_form">
        <img src="<?=base_url()?>public/images/icons/web-app/48/Info.png" alt=""/>
        <p id="text_return"></p>
        <button type="button" class="float-right" id="close_message">Ok</button>
    </div>
    
</section>